.PHONY: all debug release clean

VENDOR_EXISTS := $(shell test -d vendor && echo 1 || echo 0)
CARGO_OFFLINE = $(if $(filter 1,$(VENDOR_EXISTS)),--offline,)

all: release

debug:
	@./build/generate_kninfo.py
	cargo build $(CARGO_OFFLINE)

release:
	@./build/generate_kninfo.py --profile release
	cargo build --release $(CARGO_OFFLINE)

clean:
	@cargo clean --quiet
